/*
 *
 * Copyright (c) 2021
 * User:Dybala
 * File:ExcelUtils.java
 * Date:2021/12/06 21:41:06
 */

package com.utils;

import com.alibaba.excel.EasyExcel;
import com.config.myAnnotation.Log;

import java.util.List;

/**
 * 这个工具类用于导出excel文件
 */
public class ExcelUtils {
    @Log("导出Excel表")
    public static <T> void writeExcel(Class classname,String filename, String sheetName, List<T> data){
        EasyExcel.write(filename, classname).sheet(sheetName).doWrite(data);
    }
}
